package com.leyou.auth.controller;

import com.leyou.auth.Servcie.AuthService;
import com.leyou.pojo.dto.OssPropertiesDto;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("ali/oss")
public class AuthController {

    @Autowired
    private AuthService authService;

    @GetMapping("/signature")
    public ResponseEntity<OssPropertiesDto>  uploadFile(){
       OssPropertiesDto ossPropertiesDto = authService.uploadFile();
        return ResponseEntity.status(200).body(ossPropertiesDto);
    }
}
